// var baseUrl = "http://192.168.3.101"
// var baseUrl = "http://36338p3674.oicp.vip"
var baseUrl = "https://qyh.huidehuaxiang.com"
// var baseUrl = "https://jinzhongzixcx.jishimi.net"
// var baseUrl = "https://jingshiwenluxcx.jishimi.net"


var fun = function(config) {
    return new Promise((resolve, rejected) => {
        // uni.showLoading({
        // 	title: '加载中',
        // 	mask: true
        // }); 
        uni.request({
            ...config,
            url: baseUrl + config.url,
            header: {
                // 'Authorization': 'PurchaseCourses ' + uni.getStorageSync('token')
            },
            timeout: 50000,
            success(res) {
                resolve(res.data)
            },
            fail(res) {
                rejected(res)
            },
            complete() {
                // uni.hideLoading()
            }
        })
    })

}
export default fun